package com.wanmait.baohan.service.Impl;

import com.github.pagehelper.PageInfo;
import com.wanmait.baohan.mapper.ProductMapper;
import com.wanmait.baohan.pojo.Product;
import com.wanmait.baohan.service.ProductService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional(rollbackFor = Exception.class)
public class ProductServiceImpl implements ProductService {
    @Resource
    private ProductMapper productMapper;
    @Override
    public void insert(Product object) {
        productMapper.insert(object);
    }

    @Override
    public void delete(Integer id) {

    }

    @Override
    public void delete(String ids) {

    }

    @Override
    public void update(Product object) {

    }

    @Override
    public Product findById(Integer id) {
        return null;
    }

    @Override
    public List<Product> findAll() {
        return null;
    }

    @Override
    public List<Product> findAll(Product object) {
        return null;
    }

    @Override
    public PageInfo<Product> findPage(int pageNum) {
        return null;
    }

    @Override
    public PageInfo<Product> findPage() {
        return null;
    }

    @Override
    public PageInfo<Product> findPage(int pageNum, Product object) {
        return null;
    }

    @Override
    public PageInfo<Product> findPage(Product object) {
        return null;
    }

    @Override
    public List<Product> findAllProductsForCustomer(Integer id) {
        return productMapper.findAllProductsForCustomer(id);
    }

    @Override
    public Product findOneProductsForCustomer(Integer customerId, Integer productId) {
        return productMapper.findOneProductsForCustomer(customerId, productId);
    }

    @Override
    public List<Product> findAllBy(Product product) {
        return productMapper.findAllBy(product);
    }

    @Override
    public Product findOneBy(Integer id) {
        return productMapper.findOneBy(id);
    }


}
